YES 1.308
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule List
| ((intersect :: [Int] -> [Int] -> [Int]) :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (\vv2 ->
case | vv2 of |
| x | -> | if any (eq x) ys then x : [] else [] |
| _ | -> | [] |
) xs |
|
module Maybe where
| import qualified List import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\vv2→
case | vv2 of |
| x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
is transformed to
intersectBy0 | eq ys vv2 | =
case | vv2 of | | x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
|
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
mainModule List
| ((intersect :: [Int] -> [Int] -> [Int]) :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = |
case | vv2 of |
| x | -> | if any (eq x) ys then x : [] else [] |
| _ | -> | [] |
|
|
module Maybe where
| import qualified List import qualified Prelude
|
Case Reductions:
The following Case expression
case | vv2 of |
| x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
is transformed to
intersectBy00 | eq ys x | = if any (eq x) ys then x : [] else [] |
intersectBy00 | eq ys _ | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
mainModule List
| ((intersect :: [Int] -> [Int] -> [Int]) :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | if any (eq x) ys then x : [] else [] |
intersectBy00 | eq ys _ | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
If Reductions:
The following If expression
if any (eq x) ys then x : [] else []
is transformed to
intersectBy000 | x True | = x : [] |
intersectBy000 | x False | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
mainModule List
| ((intersect :: [Int] -> [Int] -> [Int]) :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys _ | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule List
| ((intersect :: [Int] -> [Int] -> [Int]) :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys vw | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule List
| (intersect :: [Int] -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys vw | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs1(Neg(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs5(wv41, wv5)
new_psPs1(Pos(Succ(wv3000)), Pos(Zero), wv41, wv5) → new_psPs0(wv3000, wv41, wv5)
new_psPs3(wv19, Succ(wv200), Succ(wv210), wv22, wv23) → new_psPs3(wv19, wv200, wv210, wv22, wv23)
new_psPs4(wv3000, :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
new_psPs5(:(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
new_psPs1(Neg(Succ(wv3000)), Neg(Zero), wv41, wv5) → new_psPs4(wv3000, wv41, wv5)
new_psPs1(Pos(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs2(wv41, wv5)
new_psPs1(Pos(Succ(wv3000)), Pos(Succ(wv4000)), wv41, wv5) → new_psPs(wv3000, wv3000, wv4000, wv41, wv5)
new_psPs1(Neg(Succ(wv3000)), Neg(Succ(wv4000)), wv41, wv5) → new_psPs3(wv3000, wv3000, wv4000, wv41, wv5)
new_psPs2(:(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
new_psPs(wv13, Succ(wv140), Zero, wv16, wv17) → new_psPs0(wv13, wv16, wv17)
new_psPs(wv13, Zero, Succ(wv150), wv16, wv17) → new_psPs0(wv13, wv16, wv17)
new_psPs1(Pos(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
new_psPs1(Pos(Succ(wv3000)), Neg(wv400), :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
new_psPs(wv13, Succ(wv140), Succ(wv150), wv16, wv17) → new_psPs(wv13, wv140, wv150, wv16, wv17)
new_psPs1(Neg(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
new_psPs1(Neg(Succ(wv3000)), Pos(wv400), :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
new_psPs0(wv3000, :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
new_psPs3(wv19, Succ(wv200), Zero, wv22, wv23) → new_psPs4(wv19, wv22, wv23)
new_psPs3(wv19, Zero, Succ(wv210), wv22, wv23) → new_psPs4(wv19, wv22, wv23)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs2(:(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
new_psPs1(Pos(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
new_psPs1(Pos(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs2(wv41, wv5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs1(Pos(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs2(wv41, wv5)
The graph contains the following edges 3 >= 1, 4 >= 2
- new_psPs1(Pos(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
The graph contains the following edges 1 >= 1, 3 > 2, 3 > 3, 4 >= 4
- new_psPs2(:(wv410, wv411), wv5) → new_psPs1(Pos(Zero), wv410, wv411, wv5)
The graph contains the following edges 1 > 2, 1 > 3, 2 >= 4
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs1(Neg(Succ(wv3000)), Neg(Succ(wv4000)), wv41, wv5) → new_psPs3(wv3000, wv3000, wv4000, wv41, wv5)
new_psPs3(wv19, Succ(wv200), Succ(wv210), wv22, wv23) → new_psPs3(wv19, wv200, wv210, wv22, wv23)
new_psPs1(Neg(Succ(wv3000)), Pos(wv400), :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
new_psPs3(wv19, Succ(wv200), Zero, wv22, wv23) → new_psPs4(wv19, wv22, wv23)
new_psPs4(wv3000, :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
new_psPs3(wv19, Zero, Succ(wv210), wv22, wv23) → new_psPs4(wv19, wv22, wv23)
new_psPs1(Neg(Succ(wv3000)), Neg(Zero), wv41, wv5) → new_psPs4(wv3000, wv41, wv5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs4(wv3000, :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
The graph contains the following edges 2 > 2, 2 > 3, 3 >= 4
- new_psPs1(Neg(Succ(wv3000)), Neg(Succ(wv4000)), wv41, wv5) → new_psPs3(wv3000, wv3000, wv4000, wv41, wv5)
The graph contains the following edges 1 > 1, 1 > 2, 2 > 3, 3 >= 4, 4 >= 5
- new_psPs3(wv19, Succ(wv200), Succ(wv210), wv22, wv23) → new_psPs3(wv19, wv200, wv210, wv22, wv23)
The graph contains the following edges 1 >= 1, 2 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_psPs1(Neg(Succ(wv3000)), Neg(Zero), wv41, wv5) → new_psPs4(wv3000, wv41, wv5)
The graph contains the following edges 1 > 1, 3 >= 2, 4 >= 3
- new_psPs1(Neg(Succ(wv3000)), Pos(wv400), :(wv410, wv411), wv5) → new_psPs1(Neg(Succ(wv3000)), wv410, wv411, wv5)
The graph contains the following edges 1 >= 1, 3 > 2, 3 > 3, 4 >= 4
- new_psPs3(wv19, Zero, Succ(wv210), wv22, wv23) → new_psPs4(wv19, wv22, wv23)
The graph contains the following edges 1 >= 1, 4 >= 2, 5 >= 3
- new_psPs3(wv19, Succ(wv200), Zero, wv22, wv23) → new_psPs4(wv19, wv22, wv23)
The graph contains the following edges 1 >= 1, 4 >= 2, 5 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs1(Pos(Succ(wv3000)), Pos(Succ(wv4000)), wv41, wv5) → new_psPs(wv3000, wv3000, wv4000, wv41, wv5)
new_psPs(wv13, Zero, Succ(wv150), wv16, wv17) → new_psPs0(wv13, wv16, wv17)
new_psPs(wv13, Succ(wv140), Zero, wv16, wv17) → new_psPs0(wv13, wv16, wv17)
new_psPs1(Pos(Succ(wv3000)), Neg(wv400), :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
new_psPs1(Pos(Succ(wv3000)), Pos(Zero), wv41, wv5) → new_psPs0(wv3000, wv41, wv5)
new_psPs(wv13, Succ(wv140), Succ(wv150), wv16, wv17) → new_psPs(wv13, wv140, wv150, wv16, wv17)
new_psPs0(wv3000, :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs1(Pos(Succ(wv3000)), Pos(Zero), wv41, wv5) → new_psPs0(wv3000, wv41, wv5)
The graph contains the following edges 1 > 1, 3 >= 2, 4 >= 3
- new_psPs1(Pos(Succ(wv3000)), Neg(wv400), :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
The graph contains the following edges 1 >= 1, 3 > 2, 3 > 3, 4 >= 4
- new_psPs1(Pos(Succ(wv3000)), Pos(Succ(wv4000)), wv41, wv5) → new_psPs(wv3000, wv3000, wv4000, wv41, wv5)
The graph contains the following edges 1 > 1, 1 > 2, 2 > 3, 3 >= 4, 4 >= 5
- new_psPs0(wv3000, :(wv410, wv411), wv5) → new_psPs1(Pos(Succ(wv3000)), wv410, wv411, wv5)
The graph contains the following edges 2 > 2, 2 > 3, 3 >= 4
- new_psPs(wv13, Succ(wv140), Succ(wv150), wv16, wv17) → new_psPs(wv13, wv140, wv150, wv16, wv17)
The graph contains the following edges 1 >= 1, 2 > 2, 3 > 3, 4 >= 4, 5 >= 5
- new_psPs(wv13, Succ(wv140), Zero, wv16, wv17) → new_psPs0(wv13, wv16, wv17)
The graph contains the following edges 1 >= 1, 4 >= 2, 5 >= 3
- new_psPs(wv13, Zero, Succ(wv150), wv16, wv17) → new_psPs0(wv13, wv16, wv17)
The graph contains the following edges 1 >= 1, 4 >= 2, 5 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs1(Neg(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs5(wv41, wv5)
new_psPs1(Neg(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
new_psPs5(:(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs1(Neg(Zero), Neg(Succ(wv4000)), wv41, wv5) → new_psPs5(wv41, wv5)
The graph contains the following edges 3 >= 1, 4 >= 2
- new_psPs1(Neg(Zero), Pos(Succ(wv4000)), :(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
The graph contains the following edges 1 >= 1, 3 > 2, 3 > 3, 4 >= 4
- new_psPs5(:(wv410, wv411), wv5) → new_psPs1(Neg(Zero), wv410, wv411, wv5)
The graph contains the following edges 1 > 2, 1 > 3, 2 >= 4
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_foldr(wv4, :(wv30, wv31)) → new_foldr(wv4, wv31)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr(wv4, :(wv30, wv31)) → new_foldr(wv4, wv31)
The graph contains the following edges 1 >= 1, 2 > 2